package io.github.wangtianruipopo.cardsdoudizhu.impl;

import io.github.wangtisnruipopo.carscore.types.AbsSimpleCard;
import io.github.wangtisnruipopo.carscore.types.ISimpleCard;

public class DouDiZhuCard extends AbsSimpleCard<DouDiZhuDecor, DouDiZhuCardValue> {

    @Override
    public int compareTo(ISimpleCard o) {
        // 先判断大小
        int a = this.getValue().compareTo(o.getValue());
        if (a != 0) return a;
        // 如果大小一致再判断花色
        return this.getDecor().compareTo(o.getDecor());
    }

}
